3.7 \(\int \frac{1}{a+a \sin (x)} \, dx\)

Optimal. Leaf size=12 \[ -\frac{\cos (x)}{a \sin (x)+a} \]

[Out]

-(Cos[x]/(a + a*Sin[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0102863, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {2648} \[ -\frac{\cos (x)}{a \sin (x)+a} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[x])^(-1),x]

[Out]

-(Cos[x]/(a + a*Sin[x]))

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{1}{a+a \sin (x)} \, dx &=-\frac{\cos (x)}{a+a \sin (x)}\\ \end{align*}

Mathematica [B]  time = 0.0254837, size = 29, normalized size = 2.42 \[ \frac{2 \sin \left (\frac{x}{2}\right ) \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )}{a \sin (x)+a} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[x])^(-1),x]

[Out]

(2*Sin[x/2]*(Cos[x/2] + Sin[x/2]))/(a + a*Sin[x])

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 14, normalized size = 1.2 \begin{align*} -2\,{\frac{1}{a \left ( \tan \left ( x/2 \right ) +1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sin(x)),x)

[Out]

-2/a/(tan(1/2*x)+1)

________________________________________________________________________________________

Maxima [A]  time = 1.73839, size = 22, normalized size = 1.83 \begin{align*} -\frac{2}{a + \frac{a \sin \left (x\right )}{\cos \left (x\right ) + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x)),x, algorithm="maxima")

[Out]

-2/(a + a*sin(x)/(cos(x) + 1))

________________________________________________________________________________________

Fricas [A]  time = 1.59791, size = 68, normalized size = 5.67 \begin{align*} -\frac{\cos \left (x\right ) - \sin \left (x\right ) + 1}{a \cos \left (x\right ) + a \sin \left (x\right ) + a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x)),x, algorithm="fricas")

[Out]

-(cos(x) - sin(x) + 1)/(a*cos(x) + a*sin(x) + a)

________________________________________________________________________________________

Sympy [A]  time = 0.261398, size = 10, normalized size = 0.83 \begin{align*} - \frac{2}{a \tan{\left (\frac{x}{2} \right )} + a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x)),x)

[Out]

-2/(a*tan(x/2) + a)

________________________________________________________________________________________

Giac [A]  time = 1.66146, size = 18, normalized size = 1.5 \begin{align*} -\frac{2}{a{\left (\tan \left (\frac{1}{2} \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(x)),x, algorithm="giac")

[Out]

-2/(a*(tan(1/2*x) + 1))